using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Force Directed Layout</para>
    /// <para>Adds the Force Directed Layout algorithm to the list of layouts to be automatically chained at the end of the building of diagrams based on a given template. This tool also presets the Force Directed Layout algorithm parameters for any diagram based on that template.</para>
    /// <para>将“强制定向布局”算法添加到布局列表中，以便在基于给定模板构建逻辑示意图结束时自动链接。此工具还为基于该模板的任何逻辑示意图预设了强制定向布局算法参数。</para>
    /// </summary>    
    [DisplayName("Add Force Directed Layout")]
    public class AddForceDirectedLayout : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddForceDirectedLayout()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the layout algorithm will automatically execute when generating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added layout algorithm will automatically run during the generation of any diagram that is based on the Input Diagram Template parameter. This is the default.
        ///       <para>The parameter values specified for the layout algorithm are used to run the layout during diagram generation. They are also loaded by default when the algorithm is to be run on any diagram based on the input template.    </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>Unchecked—All the parameter values currently specified for the added layout algorithm will be loaded by default when the algorithm is to be run on any diagram based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成逻辑示意图时是否自动执行布局算法。
        ///   <bulletList>
        /// <bullet_item>选中 - 添加的布局算法将在生成基于输入逻辑示意图模板参数的任何逻辑示意图期间自动运行。这是默认设置。
        ///       <para>为布局算法指定的参数值用于在逻辑示意图生成期间运行布局。默认情况下，当算法要在基于输入模板的任何逻辑示意图上运行时，也会加载它们。   </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>未选中—默认情况下，当要在基于输入模板的任何逻辑示意图上运行该算法时，将加载当前为添加的布局算法指定的所有参数值。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        public AddForceDirectedLayout(object _in_utility_network, object _template_name, _is_active_value _is_active)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Force Directed Layout";

        public override string CallName => "nd.AddForceDirectedLayout";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _are_containers_preserved.GetGPValue(), _iterations_number, _repel_factor, _degree_freedom.GetGPValue(), _out_utility_network, _out_template_name, _breakpoint_position, _edge_display_type.GetGPValue()];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the layout algorithm will automatically execute when generating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added layout algorithm will automatically run during the generation of any diagram that is based on the Input Diagram Template parameter. This is the default.
        ///       <para>The parameter values specified for the layout algorithm are used to run the layout during diagram generation. They are also loaded by default when the algorithm is to be run on any diagram based on the input template.    </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>Unchecked—All the parameter values currently specified for the added layout algorithm will be loaded by default when the algorithm is to be run on any diagram based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成逻辑示意图时是否自动执行布局算法。
        ///   <bulletList>
        /// <bullet_item>选中 - 添加的布局算法将在生成基于输入逻辑示意图模板参数的任何逻辑示意图期间自动运行。这是默认设置。
        ///       <para>为布局算法指定的参数值用于在逻辑示意图生成期间运行布局。默认情况下，当算法要在基于输入模板的任何逻辑示意图上运行时，也会加载它们。   </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>未选中—默认情况下，当要在基于输入模板的任何逻辑示意图上运行该算法时，将加载当前为添加的布局算法指定的所有参数值。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Preserve container layout</para>
        /// <para><xdoc>
        ///   <para>Specifies how the algorithm will process containers.
        ///   <bulletList>
        ///     <bullet_item>Checked—The layout algorithm will execute on the top graph of the diagram so containers are preserved.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The layout algorithm will execute on both content and noncontent features in the diagram. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定算法将如何处理容器。
        ///   <bulletList>
        ///     <bullet_item>选中 - 布局算法将在逻辑示意图的顶部图形上执行，以便保留容器。</bullet_item><para/>
        ///     <bullet_item>未选中 - 布局算法将对逻辑示意图中的内容要素和非内容要素执行。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Preserve container layout")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _are_containers_preserved_value _are_containers_preserved { get; set; } = _are_containers_preserved_value._false;

        public enum _are_containers_preserved_value
        {
            /// <summary>
            /// <para>PRESERVE_CONTAINERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PRESERVE_CONTAINERS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>IGNORE_CONTAINERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("IGNORE_CONTAINERS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Number of Iterations</para>
        /// <para>The number of iterations to process. The default is 20.</para>
        /// <para>要处理的迭代次数。默认值为 20。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Iterations")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _iterations_number { get; set; } = 20;


        /// <summary>
        /// <para>Repel Factor</para>
        /// <para>Adds distance between diagram junctions that are close together. The larger the repel factor, the greater the distance that will be added between nearly overlapping diagram junctions. The default is 1.</para>
        /// <para>添加彼此靠近的逻辑示意图交汇点之间的距离。排斥因子越大，在几乎重叠的逻辑示意图交汇点之间增加的距离就越大。默认值为 1。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Repel Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _repel_factor { get; set; } = 1;


        /// <summary>
        /// <para>Degree of Freedom</para>
        /// <para><xdoc>
        ///   <para>Specifies the area used to move the diagram junctions during each algorithm iteration.</para>
        ///   <bulletList>
        ///     <bullet_item>Low—The area used to move the diagram junctions will be limited. This is the default.</bullet_item><para/>
        ///     <bullet_item>High—The area used to move the diagram junctions will be large.</bullet_item><para/>
        ///     <bullet_item>Medium—The area used to move the diagram junctions will be moderate.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在每次算法迭代期间用于移动逻辑示意图交汇点的区域。</para>
        ///   <bulletList>
        ///     <bullet_item>低—用于移动逻辑示意图交汇点的区域将受到限制。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>高 - 用于移动逻辑示意图交汇点的区域将很大。</bullet_item><para/>
        ///     <bullet_item>中 - 用于移动逻辑示意图交汇点的区域为中等区域。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Degree of Freedom")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _degree_freedom_value _degree_freedom { get; set; } = _degree_freedom_value._LOW;

        public enum _degree_freedom_value
        {
            /// <summary>
            /// <para>Low</para>
            /// <para>Low—The area used to move the diagram junctions will be limited. This is the default.</para>
            /// <para>低—用于移动逻辑示意图交汇点的区域将受到限制。这是默认设置。</para>
            /// </summary>
            [Description("Low")]
            [GPEnumValue("LOW")]
            _LOW,

            /// <summary>
            /// <para>Medium</para>
            /// <para>Medium—The area used to move the diagram junctions will be moderate.</para>
            /// <para>中 - 用于移动逻辑示意图交汇点的区域为中等区域。</para>
            /// </summary>
            [Description("Medium")]
            [GPEnumValue("MEDIUM")]
            _MEDIUM,

            /// <summary>
            /// <para>High</para>
            /// <para>High—The area used to move the diagram junctions will be large.</para>
            /// <para>高 - 用于移动逻辑示意图交汇点的区域将很大。</para>
            /// </summary>
            [Description("High")]
            [GPEnumValue("HIGH")]
            _HIGH,

        }

        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        /// <summary>
        /// <para>Break Point Relative Position (%)</para>
        /// <para><xdoc>
        ///   <para>The relative position of the two inflexion points that will be inserted along the diagram edges to compute the curved edges geometry when Edge Display Type is set to Curved edges (edges_display_type = "CURVED_EDGES" in Python). It is a percentage between 15 and 40; the default is 30. For example, with a Break Point Relative Position (%) parameter value of N between 15 and 40, the following is true:</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>X being the x-coordinate of the edge's from junction and Y being the y-coordinate of the edge's to junction for a horizontal tree:
        ///       <bulletList>
        ///         <bullet_item>The first inflexion point will be positioned at N% of the length of the [XY] segment  </bullet_item><para/>
        ///         <bullet_item>The second inflexion point will be positioned at (100 - N)% of the length of the [XY] segment  </bullet_item><para/>
        ///       </bulletList>
        ///       </bullet_item><para/>
        ///       <bullet_item>Y being the y-coordinate of the edge's from junction and X being the x-coordinate of the edge's to junction for a vertical tree:
        ///       <bulletList>
        ///         <bullet_item>The first inflexion point will be positioned at N% of the length of the [YX] segment  </bullet_item><para/>
        ///         <bullet_item>The second inflexion point will be positioned at (100 - N)% of the length of the [XY] segment  </bullet_item><para/>
        ///       </bulletList>
        ///       </bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        ///   <para>The concept of the from and to junctions above is relative to the tree direction; it is not related to the topology of the network feature or object edge.</para>
        ///   <para>This parameter is ignored when the Edge Display Type parameter is set to Regular edges (edges_display_type = "REGULAR_EDGES" in Python).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>当“边显示类型”设置为“弯曲边”（Python 中为 edges_display_type = “CURVED_EDGES”）时，将沿逻辑示意图边插入以计算弯曲边几何的两个拐点的相对位置。它是 15 到 40 之间的百分比;默认值为 30。例如，如果断点相对位置 （%） 参数值介于 15 和 40 之间，则满足以下条件：</para>
        ///   <para>
        ///     <bulletList>
        /// <bullet_item>X 是边的 from 交汇点的 x 坐标，Y 是水平树的边到交汇点的 y 坐标：
        ///       <bulletList>
        ///         <bullet_item>第一个拐点将位于 [XY] 段长度的 N% 处</bullet_item><para/>
        ///         <bullet_item>第二个拐点将位于 [XY] 段长度的 （100 - N）% 处</bullet_item><para/>
        ///       </bulletList>
        ///       </bullet_item><para/>
        /// <bullet_item>Y 是边的 from 交汇点的 y 坐标，X 是垂直树的边到交汇点的 x 坐标：
        ///       <bulletList>
        ///         <bullet_item>第一个拐点将位于 [YX] 段长度的 N% 处</bullet_item><para/>
        ///         <bullet_item>第二个拐点将位于 [XY] 段长度的 （100 - N）% 处</bullet_item><para/>
        ///       </bulletList>
        ///       </bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        ///   <para>上面的 from 和 to 交汇点的概念是相对于树方向的;它与网络要素或对象边缘的拓扑无关。</para>
        ///   <para>当边显示类型参数设置为常规边（Python 中为 edges_display_type = “REGULAR_EDGES”）时，将忽略此参数。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Break Point Relative Position (%)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _breakpoint_position { get; set; } = 30;


        /// <summary>
        /// <para>Edge Display Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of display for the diagram edges.</para>
        ///   <bulletList>
        ///     <bullet_item>Regular edges—All diagram edges display as straight lines. This is the default.</bullet_item><para/>
        ///     <bullet_item>Curved edges—All diagram edges are curved.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定逻辑示意图边的显示类型。</para>
        ///   <bulletList>
        ///     <bullet_item>常规边 - 所有逻辑示意图边都显示为直线。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>弯曲边 - 所有逻辑示意图边都是弯曲的。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Edge Display Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _edge_display_type_value _edge_display_type { get; set; } = _edge_display_type_value._REGULAR_EDGES;

        public enum _edge_display_type_value
        {
            /// <summary>
            /// <para>Regular edges</para>
            /// <para>Regular edges—All diagram edges display as straight lines. This is the default.</para>
            /// <para>常规边 - 所有逻辑示意图边都显示为直线。这是默认设置。</para>
            /// </summary>
            [Description("Regular edges")]
            [GPEnumValue("REGULAR_EDGES")]
            _REGULAR_EDGES,

            /// <summary>
            /// <para>Curved edges</para>
            /// <para>Curved edges—All diagram edges are curved.</para>
            /// <para>弯曲边 - 所有逻辑示意图边都是弯曲的。</para>
            /// </summary>
            [Description("Curved edges")]
            [GPEnumValue("CURVED_EDGES")]
            _CURVED_EDGES,

        }

        public AddForceDirectedLayout SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}